package com.wuan.study.web;

import com.wuan.study.service.EventService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author v-wuan
 * @date 2023/7/13 16:02:36
 * @desc
 */
@RestController
@RequestMapping("/event")
public class EventController {
    @Resource
    EventService eventService;

    @PostMapping("/test_0")
    public void event(int num) {
        if (num == 110) {
            eventService.eventPublish1();
        } else {
            eventService.eventPublish2();
        }
    }

    @PostMapping("/test_1")
    public void event(Long id) {
        eventService.eventPublish3(id);
    }
}
